﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"  import="java.sql.*"%>
<%@ page import="ookweb.Conn"%>
<%@ page import="ookweb.Data"%>
<%@ include file="public.jsp" %> 
<% 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/ookweb/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理</title>
<style type="text/css">
<!--
* {	margin:0px;	padding:0px;}
.head{ background:url(../images/m/top_bg.gif);}
.head .banner{ background:url(../images/m/top_banner.gif) no-repeat left bottom;}
.head .banner span{
		height: 23px;
		line-height:23px;
		padding:4px;
		text-align:center;
		white-space: nowrap;
		text-decoration:none;
		background-color:#61CA3A;
		border: solid 1px #1B5D03;
		font-size: 12px;
		color: #FFFFFF;
		cursor: pointer; 
	}
.head .banner .top_selected{
		background-image: url(../images/m/top_button_bg.gif);
		background-repeat: repeat-x;
		font-size: 12px; font-weight:bold;
		color: #195D01;
		border-bottom: solid 1px #F90F03;
	}
-->
</style>
<script language="JavaScript">
	function setStyle()
	{
        var oAll = document.getElementById("showMenu").getElementsByTagName("span");       
        for (var i=0;i<oAll.length;i++){
            oAll[i].className = "";
        }
	}
	
    function switchTabForBA(obj,leftUrl)
    {
		setStyle(); 
        obj.className = "top_selected"; 
        hiddenLeftMemu();
        parent.mainFrame.location.href = leftUrl;
    }

    function switchTab(obj,v)
    {
        setStyle();
        obj.className = "top_selected";
        resetImg();
        parent.leftFrame.location.href = "<%=basePath%>webadmin/left.jsp?tid="+ v;
    }

    function showMe()
    {
        setStyle();
    }

    function resetImg()
	{
	    var tempStr = parent.frames[ "scroll_leftFrame"].document.getElementById( "icon_arrow").src; 
		if(tempStr.indexOf("scroll_left_2.gif")>=0)
		{
		    parent.scroll_leftFrame.ShowHideTree();
		}
		 parent.frames[ "scroll_leftFrame"].document.getElementById( "icon_arrow").style.display='';
		//parent.scroll_leftFrame.icon_arrow.style.display='';
	}
	function hiddenLeftMemu()
	{
		parent.scroll_leftFrame.HideTree();
	}
</script>
</head>

<body>
<div class="head">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="110" valign="bottom" class="banner" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="60" valign="top"><a href="../index.jsp" style=" display:block; width:361px; height:41px"></a>&nbsp;</td>
      </tr>
    </table>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200" align="center" style=' font-family:"微软雅黑"; font-size:12px; color:#666666; font-weight:bold;'><%=m_username %>,您好，祝您工作愉快...</td>
        <td id="showMenu">
     <%
		Conn con=new Conn(dbuser,dbpass,dburl);
		ResultSet rs=con.getRs("SELECT * FROM web_topmenu order by sort asc");
		int i=1;
		String mclass="";
		while(rs.next()){
		if(i==1){mclass="class=\"top_selected\"";}else{mclass="";}
	 %>
       <span id="Tab<%=i%>" onclick="switchTab(this,'<%=rs.getString("menuid")%>');" <%=mclass %> > &nbsp;&nbsp;<%=rs.getString("menuname")%>&nbsp;&nbsp;</span>
     <% i++;}
     con.close();
     %>
      </td>
        <td><span id="timeShow"></span>&nbsp;&nbsp;<span><a href="exit.jsp" target="_top" style="font-size: 12px;color: #445d7b; text-decoration:none;">退出系统</a></span></td>
      </tr>
    </table></td>
    </tr>
</table>
</div>
<script language="JavaScript">
	try{
		//parent.leftFrame.location.href = '/mktweb/root/include/ordermanage.jsp';
	} catch(e){
		top.location.reload();
	}

function fs(str){
    var str = ("00"+str);
    return str.substr(str.length-2);
}

function Time(){
//now.getYear()+"年"+
    var now=new Date()
    var s = fs((now.getMonth()+1))+"月"+fs(now.getDate())+"日&nbsp;&nbsp;"
           +fs(now.getHours())+":"+fs(now.getMinutes())+":"+fs(now.getSeconds());
    document.getElementById("timeShow").innerHTML=s;
    setTimeout("Time()",1000);
}
Time();
</Script>
</body>
</html>
